package output

import "github.com/gin-gonic/gin"

func Fail(c *gin.Context, err error) {
	c.JSON(0, gin.H{
		"msg":  err.Error(),
		"code": 0,
		"data": "",
	})
	return
}
func Success(c *gin.Context, data interface{}) {
	c.JSON(200, gin.H{
		"msg":  "ok",
		"code": 200,
		"data": data,
	})
	return
}